<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script type="module">
        //1.通用方式来引用模块
        import * as m1 from './module/m1.js'
        import * as m2 from './module/m2.js'
        import * as m3 from './module/m3.js'

        //2.解构赋值形式引用
        import {a,abc} from './module/m1.js'
        import {a as aa,abc as dgg} from './module/m2.js'  //如果模块里面有同名属性 可以通过as来更改别名
        import {default as m3} from './module/m3.js'

        //3.简便形式引入模块 只针对默认暴露,其他类型引入会报错
        import m3 from  './module/m3.js'
        console.log(m1)
        console.log(m2)
        console.log(m3)
        //本地引入模块的时候 会产生跨域问题 通过live-server插件来解决该方法
    </script>
</body>
</html>